Skip to content

Faster LazyInternalScopeFactory->create()#5043

Merged
ondrejmirtes merged 3 commits intophpstan:2.1.xfrom
staabm:black
Feb 25, 2026
Merged

Faster LazyInternalScopeFactory->create()#5043
ondrejmirtes merged 3 commits intophpstan:2.1.xfrom
staabm:black

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented Feb 25, 2026

moving millions of method calls out of the hot path

grafik

similar to #4672

@staabm staabm changed the base branch from 2.2.x to 2.1.x February 25, 2026 14:06
@phpstan-bot
Copy link
Copy Markdown
Collaborator

You've opened the pull request against the latest branch 2.2.x. PHPStan 2.2 is not going to be released for months. If your code is relevant on 2.1.x and you want it to be released sooner, please rebase your pull request and change its target to 2.1.x.

@staabm staabm marked this pull request as ready for review February 25, 2026 14:09
@phpstan-bot
Copy link
Copy Markdown
Collaborator

This pull request has been marked as ready for review.

$this->phpVersion = $this->container->getParameter('phpVersion');
$this->currentSimpleVersionParser = $this->container->getService('currentPhpVersionSimpleParser');

$this->reflectionProvider = $this->container->getByType(ReflectionProvider::class);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, a little bit worried about doing this in the constructor

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

args, sorry :-/

@ondrejmirtes ondrejmirtes merged commit 001d465 into phpstan:2.1.x Feb 25, 2026
643 of 647 checks passed
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you!

@staabm staabm deleted the black branch February 25, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants